
{{#with borrow}}
<div class="hide aaa">
    <span id="aprVal">{{apr}}</span> <!--年化利率-->
    <span id="limitVal" >{{timeLimit}}</span>
    <span id="moneyVal" >{{account}}</span>
    <span id="styleVal" >{{style}}</span>
    <span id="isDayVal" >{{borrowTimeType}}</span>
    <span id="upMoneyVal" >0</span>
    <span id="lowestAccount">{{lowestAccount}}</span>
    <span id="mostAccount">{{mostAccount}}</span>
    <span id="accountWait">{{../accountWait}}</span>
    <span id="borrowType">{{type}}</span>
</div>
{{/with}}
<dl>

    <form action="/app/invest/tender.html" name="form1" id="doInvest" method="post" class="amount-form clearfix"
          onkeydown="if(event.keyCode==13) return false; " autocomplete="off">
        <input type="hidden" id="rateInterestId" name="rateInterestId" value="" />
        {{#with borrow}}
        <dt>
            <h2>{{name}}</h2>
            <span class="canvas"><input type="text" value="{{scales}}" class="knob" data-recommend="{{recommend}}"></span>
			<span class="ProNumber">项目编号：{{bidNo}}</span>

        </dt>
        <dd class="left-line wi50"><p>投资金额</p>

            <p><em>{{moneyFormat account}}</em>元</p></dd>
        <dd class="left-line"><p>年化利率</p>

            <p><em>{{apr}}</em>%</p></dd>
        <dd><p>投资期限</p>
			<p>{{borrowLimitTimeW borrowTimeType timeLimit}}</p></dd>
       
        <div class="d_table">
            <p><span>还款方式:<em>每月还息到期还本</em></span><span>最低投标:<em>{{bidLimit lowestAccount}}元</em></span><span>最高投标:<em>{{bidMostLimit mostAccount account}}元</em></span>
        </div>
        {{/with}}


        {{#equal borrow.status 59}}
        <div class="amount-form-box borrow_user_tip pt30 pl30 pr30">
            <dl><dt>对不起！</dt><dd class="qd-investError">该标已被管理员撤回。</dd></dl>
        </div>
        <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
        {{/equal}}
        {{#equal borrow.status 0}}
        <div class="amount-form-box borrow_user_tip pt30 pl30 pr30">
            <dl><dt>对不起！</dt><dd class="qd-investError">等待管理员初审，不能进行投资。</dd></dl>
        </div>
        <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
        {{/equal}}

        {{#isNotCanInvestmentStatus borrow.status}} {{! 无法投资状态 }}
        {{#with borrow}}
        <div class="amount-form-box borrow_full pt25 pl30 pr30">
            <p>投资笔数：<em>{{../count}}笔</em></p>
            <p>当前状态：<em>{{logBorrowStatusFun status scales type flow}}</em></p>
            <p>欢迎进入<a href="/mobile/invest/index.html" style="color:#ff8b1b;">投资列表</a>，投资其他借款。</p>
        </div>
        {{/with}}
        {{/isNotCanInvestmentStatus}}


        {{#inequality borrow.status 59}} {{!S 判断是否已被撤回 status=59 后台撤回}}
            {{#inequality borrow.status 0}}  {{!S 判断是否为预览页面 status=0}}
                {{#equal borrow.status 1}} {{!S 初审通过的标 status=1}}
                    {{#if borrowPreview}}

                        {{#equal userType 2}}
                        <div class="amount-form-box borrow_user_tip pt10 pl30 pr30">
                            <dl><dt><i class="iconfontol"></i>对不起！</dt><dd style="width: 100%; font-size: 22px;">借款人，不能进行投资。</dd></dl>
                            <a class="login_account" href="/mobile/usercenter/main.html">进入账户中心</a>
                        </div>
                        <input type="hidden" id="bid_id" value="{{../borrow/id}}"/>
                        {{/equal}}

                        {{#inequality userType 2}}{{!S 判断用户类型是否为非借款用户}}

                            {{#equal borrow/scales 100}} {{! S已满标}}
                                {{#with borrow}}
                                <div class="amount-form-box borrow_full pt20 pl30">
                                    <p>投资笔数：<em class="colee5545">{{../count}}</em><font>笔</font></p>
                                    <p>当前状态：<em>{{logBorrowStatusFun status scales type flow}}</em></p>
                                    <p class="disabled_btn">投资已结束</p>
                                    <p class="mt10 mr30 textcenter">欢迎进入<a href="/mobile/invest/index.html" style="color:#ff8b1b;">投资列表</a>，投资其他借款。</p>
                                </div>
                                {{/with}}
                                <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
                            {{/equal}} {{! E已满标}}

                            {{#inequality borrow/scales 100}} {{!S 未满标}}
                                {{!-- S 新标预告--}}
                                {{#showCountDown borrow.putStartTime serverNowTime}}
                                    <div class="invest-btns">
                                        <div class="invest-showCountDown">
                                            <label>离开标仅剩</label>
                                            <p><span id="showCountDownTime">{{{showCountDownTimeFun borrow.putStartTime serverNowTime}}}</span></p>
                                        </div>
                                    </div>
                                    <div class="form-group" style="display:none;">
                                        <input type="text" placeholder="投标金额" autocomplete="off" maxlength="7" readonly="readonly" />
                                    </div>
                                    <div class="form-group" style="display:none;">

                                        <input type="password" class="payPwdText" size="11" placeholder="" autocomplete="off"/>
                                        <input type="password" class="payPwd" placeholder="交易密码" autocomplete="off" style="display:none;"/>
                                    </div>
                                    <div class="form-action " style="display:none;"><p class="doNotInvest">立即投资</p></div>
                                {{else}}
                                    {{!-- S 通过canTender判断用户是否可投当前标--}}

                                         {{#if canTender}}
                                        <div class="t_info">
                                            <a href="#" class="btn_cz">充值</a>
                                            {{#with account}}
                                            <p> <span>可投金额: <em>{{moneyFormat ../../accountWait}} </em>元</span></p>

                                            <p class="rechargeAtOnce">
                                            <span>可用余额 : <em>{{moneyFormat useMoney}} </em>元</span>
                                            {{#if  useMoney}} 
                                            <a href="/mobile/usercenter/recharge/newRecharge.html" style="display:none">马上充值</a>
                                            {{else}}
                                              <i>余额不足，请充值</i><a href="/mobile/usercenter/recharge/newRecharge.html" style="display:block" >马上充值</a>
                                             {{/if}}
                                         
                                            </p>
                                            
                                          
                                            <!--<p class="tip"> *余额不足，请充值/投资最小单位为{{bidLimit borrow.lowestAccount}}元 </p>-->
                                        </div>
                                        <div class="t_info1">
                                        	<div class="form-group">
                                            	投资金额：
                                            	<input type="text" id="money"  class="full_w {{#equal ../../borrow.category 2}}wx-hide{{/equal}}" name="money" size="11" onKeyUp="replaceAndSetPos(this,/[^0-9]/g,'')" placeholder="100.00元起投 " autocomplete="off" maxlength="7" />
                                        	        
                                        	  
                                        	</div>
                                      
                                            <div class="tip form_group_tip form_mony_tip hide">
                                                *请输入投标金额进行投标
                                            </div>

                                            <div class="form-finalActualPayment" style="display:none;">
                                                <a href="javascript:;" class="finalActualPayment" title="实际支付"></a>
                                                <a href="javascript:;" class="finalInvestMoney" title="实际投资"></a>
                                            </div>
                                            <div class="form-group">
												<a class="btn11 choiceRedPacket" style="margin-right:5%;">使用红包</a>
												<a style="display:none;" class="btn11 choiceCoupon choiceCouponDiv">使用加息券: 0元</a>
                                            </div>
                                            
                                            <div class="my-shouyi">
                                              {{#inequality ../borrow.type 101}}{{!-- 非秒标 --}}
                                            	<p class=""> <span class="finalInvestIncome expect_count">预期收益: <em title="预期收益"> 0.00 元</em></span></p>
                                            {{/inequality}}
                                            </div>
                                            {{!S 是否开启定向密码}}
                                            {{#if ../isDirectional}}
                                            <div class="form-group">
                                                 	定向密码：
                                                <input type="password" class="isDirectionalText full_w"  size="11"  placeholder="定向密码" autocomplete="off"/>
                                                <input type="password" class="isDirectional full_w"  name="pwd" size="11" placeholder="定向密码" autocomplete="off" style="display:none;"/>
                                                <div class="form_group_tip form_directional_tip hide"></div>
                                            </div>
                                            {{/if}}
                                            {{!E 是否开启定向密码}}
                                            {{!S 交易密码相关}}
                                            {{#equal ../../payPwd false}}
                                            <div class="form-group">
                                               	 交易密码：
                                                <input type="password" class="payPwd full_w"  name="payPwd" size="11" placeholder="交易密码" autocomplete="off"  style=""/>
                                                <div class="form_group_tip form_trade_tip hide"></div>
								
                                            </div>
                                            <div class="qd-clear"></div>
                                            
                                            <div class="form-action">
                                                <input type="button" value="立即投资" class="qd-red-btn sub-invest-btn" id="immediateInvestment"/>
                                            </div>
                                            {{else}}
                                            <div class="qd-clear"></div>
                                            <div class="form-group clearboth">交易密码：<a href="/mobile/usercenter/security/modifyPaypwd.html" style="color:#c83e41">请设置交易密码</a></div>
                                            <div class="form-action">
                                                <a class="gray_btn">立即投资</a>
                                            </div>
                                            {{/equal}}
                                            {{!E 交易密码相关}}
                                            
                                            <input type="hidden" id="bid_id" name="id" value="{{../borrow/id}}"/>
                                            <input type="hidden" name="tenderToken" value="{{../tenderToken}}"/>
                                            

                                            {{/with}}
                                            
                                            {{!S红包dom结构}}
                                            <div  id="choiceRedPacket" class="hide choiceRedPacketBox">
                                                <!--<label class="checkAllRedPacket" for="checkAllRedPacket"><input type="checkbox" id="checkAllRedPacket"/>全选</label>-->
                                                <div class="redPacketTips hide"></div>
                                                <ul id="redPacketList" class="clearfix"></ul>
                                                <p class="redPackerShowTxt">选中红包总额：<span class="choiceRedPacketMoney">0</span>元&nbsp;&nbsp;实际支付金额：<span class="investMoney">0</span>元</p>
                                                <!--<div class="formula">投资可使用红包额度=投资金额*<span class="redPackageRate"></span>%</div>-->
                                                <div class="redPacketConfirm"><a href="javascript:;" id="redPacketConfirm" class="green-btn">确定</a></div>
                                                <input type="hidden" id="redMoneyIdArry" name="redEnvelopeStr" value="" />
                                            </div>
                                            {{!E红包dom结构}}
											{{!S加息券dom结构}}
                                            <div id="choiceCoupon" class="hide choiceCouponBox">
                                                <ul id="couponList" class="clearfix"></ul>
                                                <p class="redPackerShowTxt">
									                                                    选择加息券：<span class="choiceCouponMoney">0</span>%&nbsp;&nbsp;
									                                                    增加收益：<span class="couponMoney">0</span>元
									            </p>
                                                <a href="javascript:;" id="couponConfirm" class="couponConfirm" data-val="">确定</a>
                                                <div class="qd-cleaer"></div>

                                            </div>
                                            {{!E加息券dom结构}}

                                            <!--隐藏域-->
                                            <input type="hidden" id="redPackageRate" value="0"/>
                                            <!-- 红包可使用占比投资金额最大比例 -->
                                            <!-- S 体验券 -->
                                            <input type="hidden" id="experienceMoney" value="0" />
                                            <input type="hidden" id="experienceMoneyIdArry" value="" />
                                            <input type="hidden" id="canUseExperienceMoney" value="" />
                                            <!-- E 体验券隐藏域 -->

                                            <!-- S 加息券隐藏域 -->
                                            <input type="hidden" id="canUseCouponMoney" value="" />
                                            <input type="hidden" name="myRIRCouponId" class="myRIRCouponId" value="" />
                                            <!-- E 加息券隐藏域 -->
                                            <input type="hidden" name="uuid" id="uuid" value="{{../borrow/uuid}}"/>
                                            <!--隐藏域-->
                                        </div>
                                    {{else}}
                                    <p class="noInvest"></p>
                                    {{/if}}
                                {{/showCountDown}}
                                {{!-- E 新标预告--}}

                            {{/inequality}}{{!E 判断是否满标}}
                        {{/inequality}}{{!E 判断用户类型是否为非借款用户}}
                    {{else}}
                        <div class="amount-form-box borrow_user_tip pt10 pl30 pr30">
                            <dl><dt>对不起！</dt><dd style="width:100%; font-size:22px;">此页面为预览页面，不能进行投资。</dd></dl>
                        </div>
                        <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
                    {{/if}} {{! E前台投标}}
                {{/equal}}  {{! E初审通过的标}}
            {{/inequality}} {{!E 判断是否为预览页面 status=0}}
        {{/inequality}} {{!E 判断是否已被撤回 status=59 后台撤回}}
    </form>
</dl>

<dl class="detail_layer">
<a class="xmxq1" style="display:none;"><em class="detailPos1"></em>剧情描述<span></span></a>
<a class="zctd1" style="display:none;"><em class="detailPos2"></em>主创团队<span></span></a>
<a class="xmjj1"><em class="detailPos3"></em>项目简介<span></span></a>
<a class="tpzl1"><em class="detailPos4"></em>风控信息<span></span></a>
<a class="tzjl1"><em class="detailPos5"></em>投资记录<span></span></a>

</dl>

<!--<#assign menuActive="1">-->
        <!--弹出 投资流程-->

        <!--弹出 项目详情-->
<div class="box" style="display:none" id="xmxq">
<div class="demo"><a class="btnCancel"></a>

    <div class="head1">项目详情</div>
    <div class="content_1" style="height:520px;">
    {{borrowDetailContent borrow.content}}
    </div>
</div>
</div>
        <!--弹出项目简介-->
<div class="box" style="display:none" id="xmjj">
<div class="demo"><a class="btnCancel"></a>


    <div class="head1">项目简介</div>
    <div class="content_1" style="height:520px;">{{borrowDetailContent borrow.content}}</div>
</div>
</div>
<!--弹出 主创团队-->
<div class="box" style="display:none" id="zctd">
<div class="demo"><a class="btnCancel"></a>

    <div class="head1">主创团队</div>
    <div class="content_1" style="height:520px;">{{borrowDetailContent borrow.creativeTeam}}</div>
</div>
</div>


        <!--弹出 投资记录-->
<div class="box" style="display:none" id="tzjl">
<div class="demo">
<a class="btnCancel"></a>
<div class="head1">投资记录</div>
</div>
</div>
        <!--弹出图片资料-->
<div class="box" style="display:none" id="tpzl">
<div class="demo"><a class="btnCancel"></a>

    <div class="head1">风控信息</div>
    <div style="position:relative;width:96%; margin: 0 auto;">
    <div class="content_1 invest_image_layer">
        
        {{#each borrowUploads}}
        {{#equal type 4}}<input type="hidden" value="{{../../url}}/{{../picPath}}"/>{{/equal}}
        {{/each}}
    </div>
    </div>
</div>
</div>

